Optimal. Leaf size=31 \[ -\frac{\csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0923178, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.235, Rules used = {3657, 4125, 2590, 14} \[ -\frac{\csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3657
Rule 4125
Rule 2590
Rule 14
Rubi steps
\begin{align*} \int \frac{\cot ^2(x)}{\sqrt{a+a \tan ^2(x)}} \, dx &=\int \frac{\cot ^2(x)}{\sqrt{a \sec ^2(x)}} \, dx\\ &=\frac{\sec (x) \int \cos (x) \cot ^2(x) \, dx}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{\sec (x) \operatorname{Subst}\left (\int \frac{1-x^2}{x^2} \, dx,x,-\sin (x)\right )}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{\sec (x) \operatorname{Subst}\left (\int \left (-1+\frac{1}{x^2}\right ) \, dx,x,-\sin (x)\right )}{\sqrt{a \sec ^2(x)}}\\ &=-\frac{\csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}}-\frac{\tan (x)}{\sqrt{a \sec ^2(x)}}\\ \end{align*}
Mathematica [A] time = 0.0270374, size = 22, normalized size = 0.71 \[ \frac{-\tan (x)-\csc (x) \sec (x)}{\sqrt{a \sec ^2(x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.086, size = 24, normalized size = 0.8 \begin{align*}{\frac{ \left ( \cos \left ( x \right ) \right ) ^{2}-2}{\sin \left ( x \right ) \cos \left ( x \right ) }{\frac{1}{\sqrt{{\frac{a}{ \left ( \cos \left ( x \right ) \right ) ^{2}}}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.87953, size = 173, normalized size = 5.58 \begin{align*} \frac{{\left ({\left (\sin \left (3 \, x\right ) - \sin \left (x\right )\right )} \cos \left (4 \, x\right ) -{\left (\cos \left (3 \, x\right ) - \cos \left (x\right )\right )} \sin \left (4 \, x\right ) -{\left (6 \, \cos \left (2 \, x\right ) - 1\right )} \sin \left (3 \, x\right ) + 6 \, \cos \left (3 \, x\right ) \sin \left (2 \, x\right ) - 6 \, \cos \left (x\right ) \sin \left (2 \, x\right ) + 6 \, \cos \left (2 \, x\right ) \sin \left (x\right ) - \sin \left (x\right )\right )} \sqrt{a}}{2 \,{\left (a \cos \left (3 \, x\right )^{2} - 2 \, a \cos \left (3 \, x\right ) \cos \left (x\right ) + a \cos \left (x\right )^{2} + a \sin \left (3 \, x\right )^{2} - 2 \, a \sin \left (3 \, x\right ) \sin \left (x\right ) + a \sin \left (x\right )^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.402, size = 86, normalized size = 2.77 \begin{align*} -\frac{\sqrt{a \tan \left (x\right )^{2} + a}{\left (2 \, \tan \left (x\right )^{2} + 1\right )}}{a \tan \left (x\right )^{3} + a \tan \left (x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot ^{2}{\left (x \right )}}{\sqrt{a \left (\tan ^{2}{\left (x \right )} + 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08203, size = 63, normalized size = 2.03 \begin{align*} -\frac{\tan \left (x\right )}{\sqrt{a \tan \left (x\right )^{2} + a}} + \frac{2 \, \sqrt{a}}{{\left (\sqrt{a} \tan \left (x\right ) - \sqrt{a \tan \left (x\right )^{2} + a}\right )}^{2} - a} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]